<template>
	<view>
		<uni-indexed-list :options="list" :showSelect="false" @click="bindClick" ></uni-indexed-list>
	</view>
</template>

<script>
	import uniIndexedList from '../../components/uni-indexed-list/uni-indexed-list.vue'
	export default {
		data() {
			return {
				list:[{
					'letter':'A',
					'data':[
						"阿克苏学校",
						"阿拉山口学校",
						"阿勒泰学校",
						"阿里昆莎学校",
						"安庆天柱山学校",
						"澳门国际学校"
					]
				},{
					'letter':'S',
					'data':[
						"十堰外国语学校"
					]
				}]
			}
		},
		methods: {
			bindClick(e){
				console.log(e);
				//数据缓存
				uni.setStorage({
					key:'xueXiao',
					data:e.item.name,
					success() {
						console.log("缓存成功！");
						//跳转上一级页面
						uni.navigateBack({
							delta:1
						});
					}
				})
			}
		},
		components:{
			uniIndexedList
		}
	}
</script>

<style>

</style>
